<!DOCTYPE html> <!-- The new doctype -->
<HTML>
    <HEAD>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title><?php echo CHtml::encode($this->pageTitle); ?></title>
        <?php Yii::app()->clientScript->registerCoreScript('jquery') ?>                
        <SCRIPT type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/jquery.layout.js"></SCRIPT>
        <SCRIPT type="text/javascript">
            $(document).ready(function () {
                $('body').layout({ applyDefaultStyles: true });
            });
        </SCRIPT>
    </HEAD>
    <BODY>
        <DIV class="ui-layout-center">
            <?php echo $content; ?>             
        </DIV>
        <DIV class="ui-layout-north">
		<?php $this->widget('zii.widgets.CMenu',array(
			'items'=>array(
				array('label'=>'Home', 'url'=>array('/site/index')),
				array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),
				array('label'=>'Contact', 'url'=>array('/site/contact')),
				array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),
				array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest)
			),
		)); ?>            
        </DIV>
        <DIV class="ui-layout-south">South</DIV>
        <DIV class="ui-layout-east">East</DIV>
        <DIV class="ui-layout-west">West</DIV>
    </BODY>
</HTML>